<?php
require_once 'constants.php';

function notifyUserOfStatusChange($row) {
    global $imgStatuses;

    mail(   $row['email'], 
            PRODUCT_NAME . ": Submitted Picture Status Change", 
"
<html>
<head>
  <title>Birthday Reminders for August</title>
</head>
<body>
    <p>The status of the picture you recently submitted has changed:</p>
    <table>
        <tr><td style='font-weight: bold'>Description</td><td>"  . $row['description'] . "</td></tr>
        <tr><td style='font-weight: bold'>Submit Date</td><td>"  . $row['submit_date'] . "</td></tr>
        <tr><td style='font-weight: bold'>Status</td><td style='text-decoration: underline'>" . $imgStatuses[$row['status']] . "</td></tr>
        <tr><td style='font-weight: bold'>Publish Date</td><td>" . $row['publish_date'] . "</td></tr>
        <tr><td style='font-weight: bold'>Comment</td><td>"      . $row['comment'] . "</td></tr>
    </table>
    <p>Please, contact us with any questions or concerns at: " . PRODUCT_SITE_ADMIN_EMAIL . "</p>

    Regards,
</body>
</html>
",
            "From: " . PRODUCT_NAME . "<". PRODUCT_SITE_ADMIN_EMAIL . ">\r\n" .
            "MIME-Version: 1.0" . "\r\n" .
            "Content-type: text/html; charset=iso-8859-1" . "\r\n" );
}

?>
